package main

import (
	"fmt"
	"math"
)

func consts() {
	//const filename = "abc.txt"
	//const a, b = 3, 4
	const (
		FILENAME = "def.txt"
		a, b     = 3, 4
	)
	var c int
	c = int(math.Sqrt(a*a + b*b))
	fmt.Println(FILENAME, c)
}

func enums() {
	// 普通枚举  & 自增枚举
	const (
		cpp = iota
		java
		python
		golang
	)

	//b , kb ,mb , gb ,tb ,pb
	const (
		b = 1 << (10 * iota)
		kb
		mb
		gb
		tb
		pb
	)

	fmt.Println(cpp, java, python, golang)
	fmt.Println(b, kb, mb, gb, tb, pb)

}

func main() {
	//常量
	//consts()
	enums()

}
